This project explores the complex networking requirements for a self-driving car platform by designing and implementing a prototype control system on a Raspberry Pi-powered vehicle. The system architecture features a Flask-based backend server on the Raspberry Pi, which communicates in real-time with various frontend clients using WebSockets for persistent, low-latency connections. User interfaces were developed for multiple platforms, including a web browser interface, a standalone ElectronJS desktop application, and a Flutter-based Android app that also supports Bluetooth connectivity. These interfaces provide users with a live camera feed, directional controls, and real-time monitoring of the vehicle's system information, such as CPU temperature, RAM usage, and battery voltage. The overall design demonstrates a practical application of edge networking principles to create a robust and user-friendly remote control and monitoring system.
Introduction
A reliable self-driving car platform operating nationwide requires an integrated suite of wireless technologies to handle critical functions like navigation, safety updates, and data monitoring. This project demonstrates these complex networking principles through a tangible prototype: a remote control system for a Raspberry Pi-powered car. The system showcases a practical application of edge networking, enabling users to control the vehicle and monitor its status in real-time through web, desktop, and mobile interfaces.
Approaches
System Architecture
The following figure 1. is the overall system architecture:

Figure 1. System architecture
The system is comprised of two primary components: a user interface (frontend) and a Raspberry Pi that serves as the backend. All components operate within the same WLAN under a single router, which allows for direct data transmission using private IP addresses. A Flask web server on the Raspberry Pi receives data via the WiFi protocol and generates commands to control the GPIO operations. The GPIO operations are managed by the picar_4wd package, and sensor data is sent back using the same protocol.
User Interface Options
Users are provided with multiple options for controlling the Raspberry Pi car.
- PC Users
Can connect either through a standard web browser or via a dedicated ElectronJS Web App.
The web browser offers the most convenient method of access.
- Android Users
A native Android application, developed using Flutter, allows for direct connection to the
Raspberry Pi via Bluetooth.
- iOS Users
Can control the car using a web browser.
Backend Server and Communication
The backend server is built with Python using Flask, a web framework. To ensure a stable and
persistent connection for immediate data transfer, the system uses Flask-SocketIO, an
extension that enables real-time, bidirectional communication through WebSockets. This setup
avoids the need to re-establish a connection for every command sent. Data received by the
server is processed and converted into commands to interact with the Raspberry Pi's GPIOs.
For the Android application, bidirectional communication is established to send operational
commands to the car ("forward", "backward", "turn left", "turn right"). The car, in turn,
continuously sends its current speed and battery voltage back to the app. This communication
runs at 20 Hz, with the motor control on the Pi operating at 10 Hz.
Results
A custom graphical user interface (GUI) was designed from the ground up, with the layout
defined in HTML, styling in CSS, and data handling in JavaScript. The interface is organized
into several distinct sections:
- Status: This section displays the connection status, showing "Connected to the car server"
when a connection is active and "Disconnected from the car" otherwise. It also shows the
command currently being executed, such as "Executing: forward".
- Camera View: This block provides a live video stream from the Pi's camera, utilizing the
Picamera2 and OpenCV modules.
- Control Panel: Users can control the car with five buttons: forward, backward, turn left,
turn right, and stop. A command is sent when a button is pressed, and a "stop" signal is
sent upon release.
- System Information: This area displays real-time data from the Raspberry Pi, including CPU
temperature, GPU temperature, CPU usage, disk space, RAM usage, and battery voltage. This
information is gathered using functions from the picar_4wd package.

Figure 2. GUI design
> Demo Video
Project Code
> For the whole project code, please visit: https://github.com/htliang517/RaspberryPiCar